-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove unstable AST testing #10462
Remove unstable AST testing #10462
Conversation
Tests are failing via babel/babel#12939 for |
0308d7d
to
c22bea4
Compare
tests_config/run_spec.js
Outdated
"json/json/propertyKey.json", | ||
(options) => options.parser === "json-stringify", | ||
], | ||
[ | ||
"flow/function-parentheses/test.js", | ||
(options) => options.parser.startsWith("babel"), | ||
"json/json/positive-number.json", | ||
(options) => options.parser === "json-stringify", | ||
], | ||
["json/json/json5.json", (options) => options.parser === "json-stringify"], | ||
["json/json/array.json", (options) => options.parser === "json-stringify"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In now parserExpression
returns AST includes tokens
so may break AST idempotency for json-stringify
parser.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see tokens
in ignoredProperties
in clean.js
. Why does that property still affect idempotence tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably ignoreProperties
are ignored by messageAST
, are not by idempotence tests.
https://github.com/prettier/prettier/blob/main/src/main/massage-ast.js#L13-L18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should work, I'll take a look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tokens
was not ignored in estree-json
printer.
yarn.lock
Outdated
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.9.tgz#ca34cb95e1c2dd126863a84465ae8ef66114be99" | ||
integrity sha512-nEUfRiARCcaVo3ny3ZQjURjHQZUo/JkEw7rLlSZy/psWGnvwXFtPcr6jb7Yb41DVW5LTe6KRq9LGleRNsg1Frw== | ||
|
||
"@babel/parser@^7.1.0", "@babel/parser@^7.12.13", "@babel/parser@^7.13.0", "@babel/parser@^7.13.4": | ||
version "7.13.4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs deduplication.
Description
babel/babel#12915 has been fixed so we can remove unstable AST testing.
Checklist
✨Try the playground for this PR✨